Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 1 - Appearance Manager Reference / Appearance Manager Functions
Drawing Appearance-Compliant Controls /


DrawThemeFocusRect

NEW WITH THE APPEARANCE MANAGER

Draws or erases a focus ring around a specified rectangle consistent with the current theme.

pascal OSStatus DrawThemeFocusRect (
                     const Rect *inRect,
                     Boolean inHasFocus);
inRect
On input, a pointer to a rectangle.
inHasFocus
A Boolean value. If true, the focus ring should be drawn. If false, the focus ring should be erased.
function result
A result code; see "Result Codes".
DISCUSSION
The DrawThemeFocusRect function should be used to indicate that an item has keyboard focus. The focus ring is drawn outside the rectangle that is passed in and can be outset a maximum of 3 pixels.

SPECIAL CONSIDERATIONS
To achieve the right look, you should first call DrawThemeEditTextFrame or DrawThemeListBoxFrame and then call DrawThemeFocusRect, passing the same rectangle in the inRect parameter. If you use DrawThemeFocusRect to erase the focus ring around an editable text frame or list box frame, you will have to redraw the editable text frame or list box frame because there is typically an overlap.

SEE ALSO
"Dialog Box Guidelines" in Mac OS 8 Human Interface Guidelines.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998